div.row.title
  div.large-12.columns
    h2.title 更新用户资料

= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => 'form-vertical', :multipart => true }) do |f|
  = f.error_notification
  = display_base_errors resource

  .row
    .small-12.columns
      = f.input :name, :required => true
      = f.input :email, :required => true
      = f.input :password, :autocomplete => "off", :hint => "leave it blank if you don't want to change it", :required => false
      = f.input :password_confirmation, :required => false
      = f.input :current_password, :hint => "we need your current password to confirm your changes", :required => true

  .row
    .small-12.columns
      = image_tag @user.avatar.url, size: "200x200"
      = f.file_field :avatar

  hr
  = f.button :submit, '更新'

hr

div.row
  div.large-12.columns
    h3 Cancel my account
    p
      | Unhappy? #{link_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete}.
